package com.sz.sgs.common;

import java.util.List;

//通用的分页类；
public class PageBean<T> {
    private long total;  //所有行数；
    private List<T> rows;  //当前页面的数据；
    private int pageIndex =  1;  //默认当前页为第一页；
    private int pageSize =  2;  //每页2条；

    public PageBean() {

    }

    public PageBean(long total, List<T> rows, int pageIndex, int pageSize) {
        this.total = total;
        this.rows = rows;
        this.pageIndex = pageIndex;
        this.pageSize = pageSize;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public List<T> getRows() {
        return rows;
    }

    public void setRows(List<T> rows) {
        this.rows = rows;
    }

    public int getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(int pageIndex) {
        this.pageIndex = pageIndex;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }
}
